home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_02_02
/
2n02009a
< prev
next >
Wrap
Text File
|
1991-01-20
|
970b
|
34 lines
; a typical real-mode universal software interrupt
; intno bp+6 the interrupt to be executed
; regs bp+8 (offset) pointer to structure containing
; bp+0ah (segment) register values
; alias_cs initialized to 0
pubproc typical_int86 <intno, regs>
;
; save the registers that need to be saved here
;
; modify the doint procedure
mov ax, [bp].intno ; get interrupt #
mov bx, offset doint ; get the address of the int instruction
mov cs: [bx+1], al ; write the new interrupt number into
; the code right after the int instruction
;
; load the registers from the regs structure
;
call near ptr doint ; call the modified interrupt routine
;
; save the registers back into the regs structure
;
ret
endproc typical_int86
doint proc near
int 10h
ret
doint endp